﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MiscUtil;

namespace RemoteImaging
{
    class Messenger
    {
        private static Messenger _instance;
        public event EventHandler<EventArgs<int>> LprImageBufferChanged;

        public void RaiseLprImageBufferChanged(EventArgs<int> e)
        {
            EventHandler<EventArgs<int>> handler = LprImageBufferChanged;
            if (handler != null) handler(this, e);
        }

        public event EventHandler<EventArgs<int>> FaceImageBufferChanged;

        public void RaiseFaceImageBufferChanged(EventArgs<int> e)
        {
            EventHandler<EventArgs<int>> handler = FaceImageBufferChanged;
            if (handler != null) handler(this, e);
        }


        public static Messenger Instance
        {
            get
            {
                if (_instance == null)
                {
                    _instance = new Messenger();
                }

                return _instance;
            }
        }
    }
}
